From: Marco Trevisan (TreviƱo) Date: Wed, 17 Sep 2025 17:04:46 +0000 (+0200) Subject: gdm/util: Clear the request if user verifier connection is closed X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~39^2~1^2~16 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=91a736a09ed9f5e2d11c733535b479fbf4f4fddf;p=gnome-shell.git gdm/util: Clear the request if user verifier connection is closed Similarly to previous commit, in case the user verifier connection is closed we should just clear the user verifier instance, since starting from this point is going to be just invalid. Part-of: --- diff --git a/js/gdm/util.js b/js/gdm/util.js index f762b79ec..3334d61f0 100644 --- a/js/gdm/util.js +++ b/js/gdm/util.js @@ -200,6 +200,7 @@ export class ShellUserVerifier extends Signals.EventEmitter { _clearUserVerifier() { if (this._userVerifier) { this._disconnectSignals(); + this._userVerifier.get_connection().disconnectObject(this); this._userVerifier.run_dispose(); this._userVerifier = null; if (this._userVerifierChoiceList) { @@ -506,6 +507,8 @@ export class ShellUserVerifier extends Signals.EventEmitter { this._clearUserVerifier(); this._userVerifier = await this._client.open_reauthentication_channel( userName, this._cancellable); + this._userVerifier.get_connection().connectObject('closed', + () => this.clear(), this); } catch (e) { if (e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED)) return; @@ -538,6 +541,8 @@ export class ShellUserVerifier extends Signals.EventEmitter { this._clearUserVerifier(); this._userVerifier = await this._client.get_user_verifier(this._cancellable); + this._userVerifier.get_connection().connectObject('closed', + () => this.clear(), this); } catch (e) { if (e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED)) return;